import { resources, log, JsonAsset } from 'cc';

export class ConfigHelp {
    public static getConfig(name: string, f: (ass: JsonAsset) => void): void {
        const newLocal = this.fixName(name);
        resources.load(newLocal, JsonAsset, (e, s) => {
            if (e) {
                log("error config")
                return;
            }
            f(s)
        })
    }
    static fixName(name: string): string {
        return "json/" + name+"_s"

    }
}
